package spe.ui.editor;

import org.eclipse.core.resources.IFile;
import org.eclipse.ui.part.FileEditorInput;

import spe.model.notation.SPEMDiagram;

/* @author: Dao Anh Vu
 * @last update:
 * @description: this editor input is used with SPEEditor
 * 
 * When an item is going to be opened, we wrap that item into this and
 * send to editor.
 * */
public class SPEMEditorInput extends FileEditorInput 
{
	private final SPEMDiagram model;
	
	public SPEMEditorInput(IFile f)
	{
		super(f);
		this.model = null;
	}
	
	public SPEMEditorInput(IFile f, SPEMDiagram ml)
	{
		super(f);
		this.model = ml;
	}
	
	public SPEMEditorInput(FileEditorInput input)
	{
		super(input.getFile());
		this.model = null;
	}
	
	public SPEMDiagram getModel()
	{
		return model;
	}

}
